package br.com.rodrigo.utils;

import javax.jms.Queue;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;

import br.com.rodrigo.constants.Constants;

public class QueueUtils
{

    public static Queue getQueue(String queueName) throws NamingException
    {
        InitialContext initialContext = new InitialContext();
        Context envContext = (Context) initialContext.lookup(Constants.CONTEXT);
        Queue queue = (Queue) envContext.lookup(queueName);
        return queue;
    }
}
